package com.eshore.norm.pattern.combination;

/**
 * 菜单
 *
 * @author: v-chenjl62
 * @date: 2024/2/5 17:37
 */
public abstract class MenuComponent {
    protected String name;
    protected int level;

    public String getName() {
        return name;
    }

//    public void setName(String name) {
//        this.name = name;
//    }
//
//    public int getLevel() {
//        return level;
//    }
//
//    public void setLevel(int level) {
//        this.level = level;
//    }

    public void add(MenuComponent component){
        //菜单没有改方法
        throw new UnsupportedOperationException();
    }

    public void remove(MenuComponent component){
        //菜单没有改方法
        throw new UnsupportedOperationException();
    }

    public void getChild(int index){
        //菜单没有改方法
        throw new UnsupportedOperationException();
    }

    public abstract void print();
}
